package ch1;

import java.util.Scanner;

public class Zuoye030815 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入一个数：");
        double a = scan.nextDouble();
        int i = 2;
        while (a > i) {
            if (a % i == 0) {
                System.out.println("这个不是质数");
                break;
            }
            i++;
        }
        if (a == i) {
            System.out.println("这个是质数");
        }
    }
}
